set -e

# Convert model from huggingface to megatron
BASE_PATH="/mnt/home/opsfm-xz/models/Qwen/Qwen2-7B-Instruct"
MODEL_TYPE="qwen1.5-7b"
TP="2"
PP="4"
EXTRA_VOCAB_SIZE="0"

cd /mnt/tenant-home_speed/xz/Pai-Megatron-Patch/toolkits/model_checkpoints_convertor/qwen
bash hf2megatron_convertor.sh ../../../ "${BASE_PATH}" "${BASE_PATH}-megatron-tp${TP}-pp${PP}" ${TP} ${PP} "${MODEL_TYPE}" "${EXTRA_VOCAB_SIZE}" false
